
<!--
* @Description: 用户登录日志 - 表单
* @Author: DSY
* @Date: 2022-11-25 16:15:09
* @LastEditors: DSY
* @LastEditTime: 2022-11-25 16:15:09
-->
<template>
  <tw-dialog 
    v-model="visible" 
    :title="title" 
    :loading="loading" 
    width="600px" 
    height="300px" 
    @close="handleClose"
  >
    <el-form ref="dbFormRef" :model="dbForm" :rules="rules" label-width="90px" :disabled="action === 'view'">
      
      <el-form-item label="IP地址" prop="ip">
        <el-input v-model="dbForm.ip" clearable placeholder="请输入IP地址"></el-input>
      </el-form-item>
    
      <el-form-item label="登录名" prop="loginName">
        <el-input v-model="dbForm.loginName" clearable placeholder="请输入登录名"></el-input>
      </el-form-item>
    
      <el-form-item label="类别" prop="type">
        <el-input v-model="dbForm.type" clearable placeholder="请输入类别"></el-input>
      </el-form-item>
    
      <el-form-item label="用户登录类型" prop="loginType">
        <el-input v-model="dbForm.loginType" clearable placeholder="请输入用户登录类型"></el-input>
      </el-form-item>
    
    </el-form>

    <template #footer>
      <el-button @click="handleReset(true)">取 消</el-button>
      <el-button v-if="action === 'add'" type="warning" @click="handleSubmit(true)">
        提交并继续
      </el-button>
      <el-button v-if="action !== 'view'" type="primary" @click="handleSubmit(false)">
        提 交
      </el-button>
    </template>
  </tw-dialog>
</template>

<script src="./useForm.ts"></script>

<style scoped lang="scss"></style> 
